package controllers

import (
	"git.oschina.net/zsbfree/blog/models"
	"html/template"
	"log"
	"net/http"
)

type controller struct {
}

func Index(w http.ResponseWriter, r *http.Request) {
	model := models.Blog{}
	log.Println(model)
	t, err := template.ParseFiles("views/index.html")
	if err != nil {
		log.Println(err)
		return
	}
	t.Execute(w, nil)
}

func (c *controller) NotFound(w http.ResponseWriter, r http.Request) {
	log.Println("entered notfound()")
}

func (c *controller) Login(w http.ResponseWriter, r http.Request) {

}
